import http from './http'
import {
  LoginModel,
  LoginResp
} from './model'

export const loginApi = (data: LoginModel) =>
  http.post<LoginResp>('/api/user/login', data, { authRequired: false })

export const refreshTokenApi = (refreshToken: string) =>
  http.post<LoginResp>(
    '/refresh-token',
    { tokenValue: refreshToken },
    { authRequired: false }
  )
